<template>
	<view>
		<view class="nav-bar">
			<image src="../../../static/back_icon.png" @tap="back" mode=""></image>
			<view class="center">
				我的推广订单
			</view>
			<view class="right">
			</view>
		</view>
		<view class="title">
			<view class="left" @tap="chose(index)" v-for="(item,index) in title" :key="index" >
				<view class="">
					{{item.name}}
				</view>
				<view :class="bordered==index?'border':''">
				</view>
			</view>
		</view>
		<view class="list-pan">
			<view class="list-row">
				<view class="top">
					<view class="left">
						<image src="" mode=""></image>
					</view>
					<view class="right">
						<view class="name">
							陶瓷花瓶北欧创意干花插花花器客厅电视
							柜家居装饰摆件
						</view>
						<view class="yellow" v-if="bordered==1">
							已付款
						</view>
						<view class="blue" v-if="bordered==2">
							已收货
						</view>
						<view class="gray" v-if="bordered==3">
							已失效
						</view>
						<view class="refund" v-if="bordered==1">
							<image src="/static/earnings/refund.png" mode=""></image>
						</view>
					</view>
				</view>
				<view class="middle">
					<view class="">
						<view class="up">
							付款金额(元)
						</view>
						<view class="down">
							83
						</view>
					</view>
					<view class="">
						<view class="up">
							付款预估收入(元)
						</view>
						<view class="down">
							2.13
						</view>
					</view>
					<view class="">
						<view class="up">
							提成
						</view>
						<view class="down">
							6%
						</view>
					</view>
				</view>
				<view class="bottom">
					2019-08-05 15:08:23付款
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:[
					{name:'全部'},
					{name:'已付款'},
					{name:'已收货'},
					{name:'已失效'},
				],
				bordered:1
			}
		},
		methods: {
			//导航方法
			back() {
				uni.navigateBack({
					delta: 1
				});
			},
			//选择
			chose(index){
				this.bordered=index;
			},
		}
	}
</script>

<style scoped lang="scss">
	.nav-bar {
		height: 128upx;
		padding: 40upx 28upx 0;
		background: #E8271B;
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: fixed;
		width: 750upx;
		z-index: 10;

		image {
			width: 48upx;
			height: 48upx;
		}

		.center {
			font-size: 36upx;
			font-weight: 500;
			line-height: 70upx;
			color: rgba(255, 255, 255, 1);
		}

		.right {
			width: 48upx;
			height: 48upx;
		}
	}
	.title{
		position: fixed;
		width: 750upx;
		height:238upx;
		background:#F2F2F2;
		z-index: 9;
		display: flex;
		justify-content: space-between;
		
		.left{
			font-size:28upx;
			font-weight:500;
			color:rgba(51,51,51,1);
			padding: 148upx 40upx 0;
			.border{
				margin: 0 auto;
				width:44upx;
				height:5upx;
				background:rgba(232,39,27,1);
				border-radius:3upx;
			}
		}
	}
	.list-pan{
		padding-top: 238upx;
		.list-row{
			margin: 0 auto;
			width:694upx;
			height:400upx;
			background:rgba(255,255,255,1);
			border-radius:20upx;
			padding: 30upx;
			position: relative;
			.top{
				display: flex;
				.left{
					image{
						width: 180upx;
						height: 180upx;
						background: red;
						border-radius:10upx;
						margin-right: 20upx;
					}
				}
				.right{
					.name{
						font-size:24upx;
						font-weight:500;
						line-height:33upx;
						color:rgba(51,51,51,1);
					}
					.yellow{
						margin-top: 30upx;
						text-align: center;
						width:138upx;
						height:52upx;
						background:rgba(251,167,41,1);
						border-radius:26upx;
						font-size:24upx;
						font-weight:500;
						line-height:52upx;
						color:rgba(255,255,255,1);
					}
					.blue{
						margin-top: 30upx;
						text-align: center;
						width:138upx;
						height:52upx;
						background:rgba(41,160,251,1);
						border-radius:26upx;
						font-size:24upx;
						font-weight:500;
						line-height:52upx;
						color:rgba(255,255,255,1);
					}
					.gray{
						margin-top: 30upx;
						text-align: center;
						width:138upx;
						height:52upx;
						background:rgba(159,159,159,1);
						border-radius:26upx;
						font-size:24upx;
						font-weight:500;
						line-height:52upx;
						color:rgba(255,255,255,1);
					}
					.refund{
						width: 130upx;
						height: 130upx;
						position: absolute;
						right: 65upx;
						top: 81upx;
						image{
							display: block;
							width: 130upx;
							height: 130upx;
						}
					}
				}
			}
			.middle{
				display: flex;
				justify-content: space-around;
				text-align: center;
				margin-top: 5upx;
				margin-bottom: 25upx;
				.up{
					font-size:22upx;
					font-weight:500;
					color:rgba(102,102,102,1);
				}
				.down{
					font-size:28upx;
					font-weight:bold;
					color:rgba(51,51,51,1);
				}
			}
			.bottom{
				border-top: 1upx solid #F2F2F2;
				margin: 0 -30upx;
				padding-right: 30upx;
				text-align: right;
				font-size:20upx;
				font-weight:500;
				line-height:55upx;
				color:rgba(153,153,153,1);
			}
		}
	}
	

</style>
